<template>
	<el-drawer v-model="visible" title="报文详情" size="30%">
		<el-descriptions :column="2" :border="true" direction="vertical">
			<el-descriptions-item label="设备编码" :span="1">{{ data.equipmentCode }}</el-descriptions-item>
			<el-descriptions-item :label="$t('syslog.createTime')" :span="1">{{ data.createTime }}</el-descriptions-item>
			<el-descriptions-item label="报文">
				<div class="p-2 break-words break-all">
					{{ data.content }}
				</div>
			</el-descriptions-item>
		</el-descriptions>
	</el-drawer>
</template>

<script setup lang="ts">
const visible = ref(false);

const data = reactive({} as any);
const highlight = ref();

const openDialog = (row: any) => {
	visible.value = true;
	Object.assign(data, row);
};

// 暴露变量
defineExpose({
	openDialog,
});
</script>
